home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / IDL / MenuBar.idl < prev    next >
Encoding:
Text File  |  1994-04-19  |  2.7 KB  |  118 lines  |  [TEXT/MPS ]

  1. //# Copyright:    © 1993-94 by Apple Computer, Inc., all rights reserved.
  2. #ifndef _MENUBAR_
  3. #define _MENUBAR_
  4.  
  5. #ifndef _MENUBARB_
  6. #include "MenuBarB.idl"
  7. #endif
  8.  
  9. //=====================================================================================
  10. // Classes defined in this interface
  11. //=====================================================================================
  12.  
  13. interface  ODMenuBar;
  14.  
  15. //=====================================================================================
  16. // Classes used by this interface
  17. //=====================================================================================
  18.  
  19. interface  ODSession;
  20. interface  ODPart;
  21.  
  22.  
  23. //=====================================================================================
  24. // Class ODMenuBar
  25. //=====================================================================================
  26.  
  27. #ifdef _PLATFORM_MACINTOSH_
  28.  
  29. interface ODMenuBar :  ODBaseMenuBar
  30. {
  31.     void InitMenuBar(in ODSession session,
  32.                      in ODPlatformMenuBar menuBar);
  33.  
  34.     void AddSubMenu(in ODMenuID menuID,
  35.                       in ODPlatformMenu menu,
  36.                    in ODPart part);
  37.  
  38.     void RegisterCommand(in ODCommandID command,
  39.                            in ODMenuID menu,
  40.                         in ODMenuItemID menuItem);
  41.  
  42.     void UnregisterCommand(in ODCommandID command);
  43.  
  44.     void UnregisterAll();
  45.  
  46.     ODBoolean IsCommandRegistered(in ODCommandID command);
  47.  
  48.     ODBoolean IsCommandSynthetic(in ODCommandID command);
  49.  
  50.     ODCommandID GetCommand(in ODMenuID menu,
  51.                            in ODMenuItemID menuItem);
  52.  
  53.     void GetMenuAndItem(in ODCommandID command,
  54.                         inout ODMenuID menu,
  55.                         inout ODMenuItemID menuItem);
  56.  
  57.    void EnableCommand(in ODCommandID cmdNumber,
  58.                          in ODBoolean enable);
  59.  
  60.    void CheckCommand(in ODCommandID cmdNumber,
  61.                         in ODBoolean check);
  62.  
  63.    void EnableAndCheckCommand(in ODCommandID cmdNumber,
  64.                                  in ODBoolean enable,
  65.                               in ODBoolean check) ;
  66.  
  67. /* $$$$$ Should these types be IDLized, or should I remove these methods?
  68.     void SetItemString(in ODCommandID cmdNumber,
  69.                          in ConstStr255Param itemString);
  70.  
  71.    void GetItemString(in ODCommandID cmdNumber,
  72.                          out Str255 itemString);
  73. */
  74.  
  75. #ifdef __SOMIDL__
  76.     implementation
  77.       {
  78.     override:
  79.         somInit,
  80.         somUninit,
  81.         Purge,
  82.         Release,
  83.  
  84.         Display,
  85.         AddMenuLast,
  86.         AddMenuBefore,
  87.         RemoveMenu,
  88.         GetMenu,
  89.         Copy;
  90.         
  91.     releaseorder:
  92.         InitMenuBar,
  93.            AddSubMenu,
  94.         RegisterCommand,
  95.         UnregisterCommand,
  96.         UnregisterAll,
  97.         IsCommandRegistered,
  98.         IsCommandSynthetic,
  99.         GetCommand,
  100.         GetMenuAndItem,
  101.         EnableCommand,
  102.         CheckCommand,
  103.         EnableAndCheckCommand,
  104.         SetItemString,
  105.         GetItemString;
  106.  
  107.     majorversion = 1; minorversion = 0;
  108.         
  109.  
  110.   };
  111. #endif //# __SOMIDL__
  112.  
  113. };
  114.  
  115. #endif //# _PLATFORM_MACINTOSH_
  116.  
  117. #endif //# _MENUBAR_
  118.